home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
cenvid
/
sound.bat
< prev
next >
Wrap
DOS Batch File
|
1995-06-04
|
1KB
|
35 lines
@echo off
REM *******************************************************************
REM *** Sound - Sound a specified frequency for specified number of ***
REM *** ver.2 milliseconds (approximate). ***
REM *******************************************************************
CEnviD %0.bat %1 %2 %3
GOTO CENVI_EXIT
#include <sound.lib>
main(argc,argv)
{
if ( argc != 3 || 0 == (frequency=atol(argv[1])) || 0 == (duration=atol(argv[2])) )
Instructions();
else
sound(frequency,duration)
}
Instructions()
{
printf("\a\n")
printf("Sound - Sound a specified tone on the internal speaker for specified time\n")
printf("\n")
printf("SYNTAX: SOUND Freqency Duration\n")
printf("\n")
printf("Where: Frequency Tone in hertz\n")
printf(" Duration In milliseconds, accurate to %d milliseconds\n",1000/CLOCKS_PER_SEC)
printf("\n")
printf("The following example would play middle A for 2 seconds:\n");
printf(" SOUND 440 2000\n")
printf("\n")
}
:CENVI_EXIT